import * as THREE from 'three';
const model = new THREE.Group();
const a = new THREE.Vector3(0,0,0)
const b = new THREE.Vector3(20,0,0)
const c = new THREE.Vector3(10,10,0)
const ab = b.clone().sub(a)
const ac = c.clone().sub(a)
const cos = ab.clone().normalize().dot(ac.clone().normalize())//计算ab和ac的点乘值
const rad = Math.acos(cos)//通过余弦值计算弧度
const angle = THREE.MathUtils.radToDeg(rad)
console.log('计算得到ab和ac的夹角：',angle);


// ab和ac的箭头
const arrowHelper1 = new THREE.ArrowHelper(ab.normalize(), a, ab.length())
const arrowHelper2 = new THREE.ArrowHelper(ac.normalize(), a, ac.length())
console.log('',ab.length());
console.log('',ac.length());
model.add(arrowHelper1,arrowHelper2)

export default {model};